<?php
namespace app\services\ai\traits\youtu;

 trait  HumanRecognitionTrait
 {
     public function handTracking($options)
     {
         $params = ['session_id' => str_random(32)];

         /**
          * image url 二选一
          */
         if (isset($options['image'])) {
             $params['image'] = $options['image'];
         } elseif (isset($options['url'])) {
             $params['url'] = $options['url'];
         } else {
             $params['image'] = '';
         }
         return $this->request(self::POST, self::API_HAND_TRACK, $this->parseOptions($params));
     }
 }